from django.contrib import admin
from .models import Article, Comments, Category


class ArticleAdmin(admin.ModelAdmin):
    list_display = ("id", "title", "author", "publish_date", "image")
    search_fields = ("title",)


class CommentsAdmin(admin.ModelAdmin):
    list_display = ("id", "article_id", "comment_author", "comment_date", "parent_id")


class CategoryAdmin(admin.ModelAdmin):
    list_display = ("id", "c_name")


admin.site.register(Article, ArticleAdmin)
admin.site.register(Comments, CommentsAdmin)
admin.site.register(Category, CategoryAdmin)